﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace OCR.SystemThread
{
    class TestRefreshThread
    {
        public static bool TestSetInfoThread_Flowrec = false;
        public static Thread TestSetInfoFlow_Thread = null;

        public static int iTestSetInfo_Step = 0;

        public static bool TestSetInfoThread_Pause = false;
        public static void TestSetInfo_Thread()
        {
            iTestSetInfo_Step = 0;
            TestSetInfoThread_Pause = true;
            TestSetInfoThread_Flowrec = true;
            TestSetInfoFlow_Thread = new Thread(TestSetInfoThreadFlow);
            TestSetInfoFlow_Thread.IsBackground = true;
            TestSetInfoFlow_Thread.Start();
        }

        private static void TestSetInfoThreadFlow()
        {
            while (TestSetInfoThread_Flowrec)
            {
                if (!TestSetInfoThread_Pause)
                {
                    switch (iTestSetInfo_Step)
                    {
                        case 0:
                            AlgorithmModule.ImageHandleV2_Refresh(Application.StartupPath + "\\TemplateInput\\Refresh.bmp");
                            break;

                    }
                }


            }

        }
    }
}
